/**
 * 企业客户基本信息管理初始化
 */
var OpenCustomer = {
    id: "OpenCustomerView",	//表格id
    item: null,		//选中的条目
    custId: null,		//选中的条目
    custName: null,
    layerIndex: -1
};

OpenCustomer.openSelectCustomer = function(){
    var index = layer.open({
        id: OpenCustomer.id,
        type: 2,
        title: '请选择客户',
        anim:3,                    //动画
        shade: [0.8, '#393D49'],//遮罩层
        area: ['80%', '80%'], //宽高
        fix: false, //不固定
        maxmin: false,
        closeBtn: 0,
        content: Feng.ctxPath + '/custCustomerInfo/queryOpenListView',
        btn:['确定','取消'],
        yes:function () {
            var confirmSelect = $("#OpenCustomerView iframe")[0].contentWindow.CommonCustomerInfo.confirmSelect();
            if(confirmSelect == undefined || confirmSelect.length == 0){
                layer.msg("请选择客户！");
            } else {
                OpenCustomer.item = confirmSelect;
                OpenCustomer.custId = confirmSelect.id;
                OpenCustomer.custName = confirmSelect.company;
                confirmSelectCustomer(confirmSelect.id, confirmSelect.company);
                layer.close(index);
            }
        }
    });
    this.layerIndex = index;
}

$(function () {

});
